<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
<link rel="stylesheet" href="../css/ABC.css" type="text/css"/>
<script type="text/javascript" src="../js/form.js"></script>
</head>
</html>

<?php

include("../classes/ConnectionBDD.php");
include("../classes/Interventions.php");
include("../classes/Formulaires.php");
include("../classes/FormulairesI.php");

$bdd = new Connector_Sql();
$inon = new Interventions();
$frmI = new FormulairesI();
$frm = new Formulaires();

mysql_connect('localhost','root','') or die('Connexion impossible a la BDD');
mysql_select_db('ABC PRO');

$frmI->debutFormulaire('Afficher intervention(s)','aff','affInterventions.php');
$frm->ligne_vide();
$inon->listerClient2('liste_cl');
$inon->listerDate('liste_da');
$inon->listerEtat('liste_et');
$inon->listerIntervenant('liste_in');
$inon->listerInterventionType('liste_ty',1);
echo "<input type='hidden' name='temp' value='0' size=30 maxlength=20>"; //0 = cases decochees par defaut
$frm->ligne_vide();
$frm->fin_formulaire();

//cherche les interventions
if (isset($_POST['liste_cl']) and isset($_POST['liste_da']) and isset($_POST['liste_et']) and isset($_POST['liste_in']) and isset($_POST['liste_ty'])) {

	//si aucune case n'est cochee, on affiche toutes les interventions
	echo "<script>window.location.replace(\"interventionspages.php?limite=0&client=".$_POST['liste_cl']."&case=".	$_POST['temp'].
			"&date=".$_POST['liste_da']."&etat=".$_POST['liste_et']."&inter=".$_POST['liste_in']."&titre=".$_POST['liste_ty']."\")</script>";

}

$bdd->deconnect();

?>
